package com.macro.mall.service.impl;

import com.github.pagehelper.PageHelper;
import com.macro.mall.common.api.CommonPage;
import com.macro.mall.dao.UmsProductDao;
import com.macro.mall.model.PmsProduct;
import com.macro.mall.service.UmsPortalBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author：MinxiaoHao
 * @Description:
 * @name：PmsPortalBrandServiceImpl
 * @Date：2024/10/18 19:10
 */
@Service
public class UmsPortalBrandServiceImpl implements UmsPortalBrandService {

    @Autowired
    private UmsProductDao pmsProductDao;
    @Override
    public CommonPage<PmsProduct> productList(Integer brandId, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<PmsProduct> productList = pmsProductDao.selectByExample(brandId);
        return CommonPage.restPage(productList);
    }
}
